import request from './request';

export const fetchData = (url:string) => {
    return request({
        url: url,
        method: 'get'
    });
};

export const postData = <T>(url:string,data:T) => {
    return request({
        url: url,
        method: 'post',
        data:data
    });
};

export const delData = (url:string) => {
    return request({
        url: url,
        method: 'delete',
    });
};

export const putData = <T>(url:string,data:T) => {
    return request({
        url: url,
        method: 'put',
        data:data
    });
};